{% extends "main.html" %}
{% block title %}HITs Content Management Home{% endblock %}
{% block head %}{% endblock %}

{% block pageHeader %}
{% include "templates/navigation.html"%}
{% endblock %}

{% block content %}
<div class="span-14 portlet quickLinks">
    <div class="portlet-title">
        <h2>
            Quick Links
        </h2>
    </div>
    <div class="portlet-content">
        <div class="section">
            <h3><a href="/create/hit">Create New Article</a></h3>
            <p> Set up and submit request for a new article</p>
        </div>
        <div class="section">
            <h3><a href="/create/campaign">Create New Campaign</a></h3>
            <p> Create a new campaign for existing Client</p>
        </div> 
<!--        <div class="section">
            <h3><a href="#">Rework Existing Article</a></h3>
            <p> Submit request to rewrite existing article</p>
        </div>
-->
        <div class="section">
            <h3><a href="#">Upload Articles</a></h3>
            <p> Upload existing articles for future use</p>
        </div>     
    </div>
</div>
<div class="span-10 last portlet">
    <div class="portlet-title">
        <h2>
            Notifications
        </h2>
        <div class="filter">
            <label>Show</label>
            <select>
                <option>All notifications</option>
            </select>
        </div>
    </div>
    <div class="portlet-content">
        <table border="0">
            <thead>
                <tr>
                    <th>Type</th>
                    <th>Item</th>
                    <th>Result</th>
                    <th>Date</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</div>
<div class="span-14 portlet">
    <div class="portlet-title">
        <h2>
            Your HITs
        </h2>
        <div class="filter">
            <label>Show</label>
            <select>
                <option>All submitted HITs</option>
            </select>
        </div>
    </div>
    <div class="portlet-content">
    	{%if hits%}
        <table border="0">
            <thead>
                <tr>
                    <th>Title</th>
                    <th>Client</th>
                    <th>Campaign</th>
                    <th>HIT Expiration</th>
                    <th>Reward</th>
                    <th>Duration</th>
                </tr>
            </thead>
            <tbody>
            	{% for i in hits%}				
                <tr>
                    <td>{{i.title}}</td>
                    <td>{{i.client}}</td>
                    <td>{{i.campaign}}</td>
                    <td title="When HIT will expire">{{i.expiration}}</td>
                    <td>{{i.reward}}</td>
                    <td title="Length of time worker has to complete task">{{i.duration}}</td>
                </tr>
                {% endfor%}
            </tbody>
        </table>
        {%else%}
        &nbsp; There are no HITs
        {%endif%}
    </div>
</div>
{% endblock %}

{% block footer %}
{% include "templates/copyright.html" %}
{% endblock %}